文档

CreateAsyncTranslate - 创建文本异步翻译任务

机器异步翻译创建任务接口,支持100万以下字符翻译。

接口说明

1、机器异步翻译字符长度上限是 100 万字符 2、文本异步翻译创建接口参考阿里云 OpenAPI 开发者门户调试调用

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
SourceLanguagestring

原文语言,语言 code 参考

en
TargetLanguagestring

目标语言,语言 code 参考

zh
SourceTextstring

需要翻译的内容

Opinion: We have finally gotten some relief at the pump. But it may not last long
Scenestring

场景,支持:通用(general)、商品标题(title)、商品详情(description)、买卖家沟通(message)、医疗(medical)、社交(social)、科技(tech)。

general
FormatTypestring

翻译文本的格式,html( 网页格式。设置此参数将对待翻译文本以及翻译后文本按照 html 格式进行处理)、text(文本格式。设置此参数将对传入待翻译文本以及翻译后结果不做文本格式处理,统一按纯文本格式处理。

text
ApiTypestring
  • 版本类型,必须选择一个版本

  • 通用版本:translate_standard

  • 专业版本:translate_ecommerce

translate_standard

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

请求的唯一 id,用于后续排查问题使用

DC2DCCC9-C3DF-4F59-8D8E-78185729F16D
Codeinteger

错误码

200
Messagestring

返回信息

success
Dataobject

返回数据

JobIdstring

异步任务 ID。

98bbb007-71bb-448b-bab0-2695ce8f8599
Statusstring

任务状态

ready

示例 正常返回示例

JSON 格式

{ "RequestId": "3AD51F66-4829-1E47-93F7-03BE3C0428F3", "Data": { "Status": "ready", "JobId": "2ff1e8b1-3842-4f1a-9bba-b8eea6b9720b" }, "Code": "200" }

示例

正常返回示例

JSON格式

{
  "RequestId": "DC2DCCC9-C3DF-4F59-8D8E-78185729F16D",
  "Code": 200,
  "Message": "success",
  "Data": {
    "JobId": "98bbb007-71bb-448b-bab0-2695ce8f8599",
    "Status": "ready"
  }
}

错误码

HTTP status code错误码错误信息描述
10110001The request has timed out.请求超时
10310003An error occurred while decoding the URL. Verify that the specified URL is encoded.原文解码失败,请检查原文是否UrlEncode
10410004Some required parameters are missing.参数缺失
10510005The specified language pair is not supported.语项不支持
10610006An error occurred while detecting the language.语种识别失败
10710007An error occurred while translating.翻译失败
10810008The specified string is too long.字符长度过长
40010010You have not activated this service.账号没有开通服务
40010013You have not activated the account service or the account service has overdue bills.账号服务没有开通或者欠费
40010021The parameter is invalid.参数无效。
40010026Failed to translate the certificate. Please check the parameters.证件翻译失败,请检查提交的参数。
40310009The RAM user is not authorized to perform this operation.子账号没有权限
40410025The specified task does not exist.指定的任务不存在。
50010002A system error occurred.系统错误
50010011An error occurred while invoking the RAM user service.子账号服务失败
50010012An error occurred while calling the translation service.翻译服务调用失败

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
暂无变更历史
  • 本页导读 (0)
文档反馈